package development;

import state.GameConstants;
import state.GameForm;
import state.GameGlobal;
import state.Graphics;
import state.Key;
import state.font.FontManager;
import state.font.ImageText;
import development.group.FrmGroupMenu;

public class FrmEmpty extends GameForm {
  private ImageText text;
  
  private static GameForm singleton;
  
  public static GameForm instance() {
    if (singleton == null) {
      singleton = new FrmEmpty();
    }
    return singleton;
  }
  
  public void init(java.util.Hashtable parameters) {
    text = FontManager.getFont(FontManager.FONT_SIZE_11);
  }
  
  public void draw(Graphics g) {
    text.drawString1(g, "This form is not implement yet", GameConstants.SCREEN_WIDTH / 2, GameConstants.SCREEN_HEIGHT / 2, GameConstants.CENTER_ANCHOR);
  }
  
  public void keyReleased(int keyCode) {
    if (keyCode == Key.SOFT_RIGHT) {
      if (Global.systemCanvas.lastState instanceof FrmDownloadResource) {
        GameGlobal.nextState(FrmGroupMenu.instance(), null);
      } else {
        GameGlobal.nextState(Global.systemCanvas.lastState, null);
      }
    }
  }
}
